package com.hm.cms.domain;

import java.util.List;

import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.hm.cms.auto.su.BaseDomain;
import com.hm.cms.auto.su.R;

import lombok.Getter;
import lombok.Setter;

/**
 * @author shishun.wang
 * @date 下午1:33:26 2017年10月13日
 * @version 1.0
 * @describe 文章标签关系
 */
@Setter
@Getter
@Document(collection = R.Database.prefix + "TERM_TAY_RELATIONSHIPS")
@CompoundIndexes({ @CompoundIndex(name = "term_ids,status", def = "{'term_ids': 1,'status':1}"),
		@CompoundIndex(name = "term_tay_ids,status", def = "{'term_tay_ids': 1,'status':1}") })
public class TermTayRelationshipsDomain extends BaseDomain {

	private static final long serialVersionUID = 1L;

	/**
	 * 文章阅读数量
	 */
	@Field(value = "article_view_quantity")
	private Integer viewQuantity;

	/**
	 * 真实阅读量
	 */
	@Field(value = "real_view_quantity")
	private Integer realViewQuantity;

	/**
	 * 文章评论
	 */
	@Field(value = "article_comment_quantity")
	private Integer commentQuantity;

	/**
	 * 真实评论数
	 */
	@Field(value = "real_comment_quantity")
	private Integer realCommentQuantity;

	/**
	 * 关联分类关系
	 */
	@Field(value = "term_ids")
	private List<String> termIds;

	/**
	 * 关联标签关系
	 */
	@Field(value = "term_tay_ids")
	private List<String> termTayIds;

	@Indexed(unique = true)
	@Field(value = "article_id")
	private String articleId;

}
